﻿using ScaffoldSystem.Entities;
using ScaffoldSystem.Repositories.Abstract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ScaffoldSystem.Repositories.Concrete
{
    public class SysDeptRepository : ISysDeptRepository
    {
        private EFDbContext context;

        public SysDeptRepository(EFDbContext context)
        {
            this.context = context;
        }

        public SysDept FindDeptById(int deptId)
        {
            return context.Depts.Where(dept => dept.Id == deptId).FirstOrDefault();
        }
    }
}
